# Create your views here.
import urllib2
from django.http import HttpResponse
from django.shortcuts import render_to_response
from models import Address

def latest_address(request):
    addresslist = Address.objects.order_by('-pub_date')[:10]
    return render_to_response('latest_address.html', {'addresslist':addresslist})

def test(request):
    ret = urllib2.urlopen("http://friend.renren.com/GetFriendList.do?id=227638867").read()
    print ret
    return HttpResponse(ret)